<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>分类管理</title>
    <div th:include="admin/head"></div>
</head>
<body>
<div th:include="admin/header"></div>

<p>
    <a class="btn btn-default" href="/admin/category/add" role="button">添加分类</a>
</p>

<table class="table table-hover">
    <thead>
    <tr>
        <th>ID</th>
        <th>标题</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="category : ${list}">
        <th scope="row" th:text="${category.id}">ID</th>
        <td><a href="" th:href="'/category/' + ${category.id}" th:text="${category.title}">标题</a></td>
        <td>
            <a class="btn btn-default" th:href="'/admin/category/edit/' + ${category.id}" role="button">编辑</a> |
            <a class="btn btn-default" th:href="'/admin/category/delete/' + ${category.id}" role="button">删除</a>
        </td>
    </tr>
    </tbody>
</table>

<div th:include="admin/footer"></div>
</body>
</html>